.TH kmount 8
'''
.SH NAME
\fBkmount\fR \- attach filesystem tree to a given directory
'''
.SH SYNOPSIS
.IP "\fBkmount\fR [\fB-crtdxusy\fR] \fItarget\fR \fIsource\fR [\fIfstype\fR [\fIdata\fR]]" 4
Mount block device \fIsource\fR onto \fItarget\fR directory.
.IP "\fBkmount\fR \fB-n\fR[\fBcrtdxusy\fR] \fItarget\fR \fIfstype\fR [\fIdata\fR]" 4
Mount virtual filesystem \fIfstype\fR onto \fItarget\fR.
.IP "\fBkmount\fR \fB-b\fR \fItarget\fR \fIsource\fR" 4
Bind mount: attach \fIsource\fR directory onto \fItarget\fR (MS_BIND).
.IP "\fBkmount\fR \fB-m\fR \fItarget\fR \fIsource\fR" 4
Move mount: detach \fIsource\fR and attach it at \fItarget\fR (MS_MOVE).
.IP "\fBkmount\fR \fB-e\fR[\fBrdxuy\fR] \fItarget\fR \fIdata\fR" 4
Remount \fItarget\fR, possibly changing its mount options (MS_REMOUNT).
.IP "\fBkmount\fR \fB-u\fR[\fBfdxn\fR] \fItarget\fR \fItarget\fR ..." 4
Unmount each \fItarget\fR.
.IP "\fBkmount\fR \fB-v\fR[\fBc\fR] \fItarget\fR \fItarget\fR ..." 4
Mount pre-defined virtual filesystems at given locations.
'''
.SH DESCRIPTION
Mounting replaces visible contents of \fItarget\fR directory with some other
file subtree. Typical invocation attaches a \fIfstype\fR filesystem tree
contained on block device \fIsource\fR, with optional \fIdata\fR passed
to the filesystem driver.
.P
With relevant options, kmount can also attach existing directory trees
at different locations, and change mount options for already-mounted
filesystems. 
'''
.SH OPTIONS
.IP "\fB-u\fR" 4
Umount specified directories.
.IP "\fB-v\fR" 4
Mount pre-defined virtual filesystems.
.IP "\fB-c\fR" 4
Create mountpoint if mounting, remove if unmounting.
.P
The following apply if neither \fB-u\fR nor \fB-v\fR were used.
.IP "\fB-r\fR" 4
Mount \fIsource\fR read-only (MS_RDONLY).
.IP "\fB-t\fR" 4
Enable reduced updates of inode timestamps (MS_LAZYTIME).
.IP "\fB-d\fR" 4
Do not allow access to device files on this filesystem (MS_NODEV).
.IP "\fB-x\fR" 4
Do not allow programs to be executed from this filesystem (MS_NOEXEC).
.IP "\fB-s\fR" 4
Do not honor set-user-ID and set-group-ID bits when executing programs
from this filesystem (MS_NOSUID).
.IP "\fB-i\fR" 4
Suppress the display of certain messages in the kernel log (MS_SILENT).
.IP "\fB-y\fR" 4
Make writes on this filesystem synchronous (MS_SYNCHRONOUS).
.P
With \fB-u\fR, the options set flags for \fBumount\fR(2):
.IP "\fB-f\fR" 4
Force unmounting (MNT_FORCE).
.IP "\fB-d\fR" 4
Perform a lazy unmount (MNT_DETACH).
.IP "\fB-x\fR" 4
Make mount point as expired (MNT_EXPIRE).
.IP "\fB-n\fR" 4
Do not follow symlinks (UMOUNT_NOFOLLOW).
'''
.SH NOTES
This tool does not read /etc/fstab and does not update /etc/mtab.
To check the list of currently mounted filesystems, cat /proc/mounts.
.P
Pre-defined mountpoints that can be mounted with \fB-v\fR:
.IP "" 4
/dev
.br
/dev/pts
.br
/dev/shm
.br
/dev/mqueue
.br
/proc
.br
/sys
.br
/run
.br
/mnt
.br
/tmp
.br
/sys/kernel/config
.br
/sys/kernel/debug
.br
/sys/kernel/debug/tracing
'''
.SH SEE ALSO
\fBmount\fR(2), \fBumount\fR(2), \fBpmount\fR(1)
